<template>
  <div class="integral-index">
    <van-nav-bar fixed :z-index="100" title="积分商城" left-arrow @click-left="onClickLeft" />
    <div class="integral-index-content">
        <div>
            <img class="integral-bg-img" src="@/assets/images/temporary.png" />
            <div class="integral-introduce">积分商城尚未开通</div>
        </div>
    </div>
  </div>
</template>

<script>
  import { mapState } from 'vuex'
  import {
    Icon,
    Cell,
    Toast,
    Card,
    Button,
    NavBar
  } from 'vant'
  import Arrow from '@/components/vue-scroller/components/Arrow.vue'
  import storeNavBar from '@/components/store-nav-bar'
  import storeScroller from '@/components/store-scroller'
  import { isIOS } from 'mobile-device-detect'
  import service from '@/utils/service'
  import storeService from '@/components/store-service'
  export default {
    components: {
      [Icon.name]: Icon,
      [Cell.name]: Cell,
      [Card.name]: Card,
      [Button.name]: Button,
      [NavBar.name]: NavBar,
      Toast,
      Arrow,
      storeNavBar,
      storeScroller,
      storeService
    },
    computed: {
      // ...mapState({
      //   content: state => state.home.content
      // })
      ...mapState({
        isLogin: state => state.user.isLogin,
        userInfo: state => state.user.userInfo
      }),
    },
    //   computed: {
    //   ...mapState({
    //     payChannels: state => state.payChannel.payChannel,
    //     userInfo: state => state.user.userInfo
    //   })
    // },
    data() {
      return {
        isIOS: isIOS,
        images: ['', '', '', ''],
        list: [],
        msgDetail: {
          orderItemList: []
        },
        showService: false
      }
    },
    created() {
      // console.log(this.$route.params.id)
      // this.$store.dispatch('home/content')
    },
    methods: {
      getMsgDetail() {
        this.$http.post("order/orderDetail", { orderId: this.$route.params.id }).then(data => {
          this.msgDetail = data.info;
        }).catch(error => {
        })
      },
      onClickLeft() {
        this.$router.push('/msg')
      },
      openService() {
        if (!this.isLogin) {
          this.$router.push('/login')
          this.$store.commit('user/SET_BEFOREPATH', this.$route.path)
          // Toast('用户未登录')
          return
        }
        const { umsMember } = this.userInfo;
        service.init(this.userInfo, null, null, () => {
          this.showService = true
        });
        // ysf('open', {})	
        // this.$http.post("/url", {})
        //   .then(res => {
        //     ysf("onready", () => {
        //       service.init(this.userInfo, this.goods , res.data.groupid, () => {
        //         this.showService = true
        //       });
        //     });
        //   })
        //   .catch(error => {

        //   });
        //初始化客服商品内容
        //  service.product(this.goods)
        // this.showService = true
      },
      subAddress() {
        this.$http.post("order/receiverConfirm", { orderId: this.$route.params.id }).then(data => {
          Toast('确认成功');
          this.msgDetail.receiverConfirm = 1;
        }).catch(error => {
        })
      }
    }
  }
</script>

<style lang="scss" scoped>
   .integral-index{
      min-height: 100vh;
      padding-top: 1.76rem;
      position: relative;
      background: $bg-clr;
      .integral-index-content{
        position: absolute;
        top:0;
        width: 100vw;
        min-height: 100vh;
        justify-content: center;
        align-items: center;
        display: flex;
        .integral-bg-img{
          width: 289px;
        }
        .integral-introduce{
          font-size: $font-size-small;
          color: $text-clr;
          text-align:center;
        }
        /* .integral-content-box{
          min-height: 100vh;
          padding-top: 1.76rem;
        } */
      }
      /* .van-list{
        min-height: 100vh;
        padding-top: 1.76rem;
      } */
    }
</style>